<?php
//
// index.php - Acts as bootstrapper for this MVC app
//

// Error Reporting
error_reporting(E_ALL); //|E_STRICT);// doesn't work well with PEAR
ini_set('display_errors', 'on'); //Debug:on Production:off

ini_set('include_path', ini_get('include_path') . 
    PATH_SEPARATOR . '../library'. 
    PATH_SEPARATOR . '../application/models' .
    PATH_SEPARATOR . '/home/stconrad/Zend' .
    PATH_SEPARATOR . '/home/stconrad/pear/php' .
    PATH_SEPARATOR . '/home/stconrad/phpFlickr');  

date_default_timezone_set('America/New_York');

// Zend Loader
require "Zend/Loader.php";
Zend_Loader::registerAutoload();

// Required Classes
Zend_Loader::loadClass('Zend_Config_Ini');
Zend_Loader::loadClass('Zend_Controller_Front');
Zend_Loader::loadClass('Zend_Layout');
Zend_Loader::loadClass('Zend_OpenId_Consumer');
Zend_Loader::loadClass('Zend_Auth');

//Setup Ini Configuration
$config = new Zend_Config_Ini('../application/config.ini', 'main');

// Setup Controller
$front = Zend_Controller_Front::getInstance();
$front->setControllerDirectory('../application/controllers');

Zend_Layout::startMvc(array('layoutPath'=>'../application/layouts'));

// Put us in 'development' mode if config.ini 'development' == true
if ($config->development) {
    $front->throwExceptions(false);
    $front->setParam('env', 'development');
}

// Go!
$front->dispatch();